package com.imti.controller;


import com.imti.Api.CommonResult;
import com.imti.entity.DeskWork;
import com.imti.entity.dto.DeskWorkDto;
import com.imti.service.DeskWorkService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * (DeskWork)表控制层
 *
 * @author makejava
 * @since 2023-02-01 12:13:29
 */
@RestController
@RequestMapping("deskWork")
public class DeskWorkController {

    @Resource
    private DeskWorkService deskWorkService;

   /* @GetMapping("/findAllDeskWork")
    public CommonResult<List<DeskWork>> selectAll(){

        return CommonResult.success(deskWorkService.list());
    }*/


   /* @GetMapping("/findAllDeskWorkByName")
    public CommonResult<DeskWork> findAllDeskWorkByName(String deskName) {

        return CommonResult.success(deskWorkService.findAllDeskWorkByName(deskName));
    }

    @GetMapping("/findDeskWorkByName")
    public CommonResult<List<DeskWork>> findDeskWorkByName(String deskName){
        return CommonResult.success(deskWorkService.findDeskWorkByName(deskName));
    }*/

    /**
     * 科室详细信息
     * @param deskId
     * @return
     */
    @GetMapping("findDeskWorkById")
    public CommonResult<List<DeskWorkDto>> findDeskWorkById(Integer deskId){
        return CommonResult.success(deskWorkService.findDeskWorkById(deskId));
    }

    /**
     * 医生科室分类列表
     * @return
     */
    @RequestMapping ("findAllDeskWork")
    public CommonResult<List<DeskWork>> findAllDeskWork(){
        return CommonResult.success(deskWorkService.findAllDeskWork());
    }


}

